<?php

class Activity_Controller_Browse_Ajax_Liked extends Nuo_Controller
{
	function execute($request)
	{

		$table = Nuo::getTable('activity/like');

		$id = $request -> getParam('id');

		$resource = Nuo::getItem($id);

		if (!$resource)
		{

		}

		if ($resource -> getType() == 'activity-feed')
		{
			$object = $resource -> getObject();
		}
		else
		{
			$object = $resource;
		}

		$select = $table -> select() -> where('resource_id=?', $object -> getItemId()) -> limit(10);

		$items = $table -> fetchAll($select);

		return  $this -> render(array('items' => $items));
	}

}
